Defining the Intent

When creating a flow, you provided an initial utterance (the first training phrase) for the bot to match the user’s intent. Equipping your bot with multiple training phrases per flow and training it enhances its ability to accurately discern user intent.

To manage training phrases, follow these steps:

Step 1. Access flow training phrases

To access the flow training phrases, use one of the following two options

  • Using the Flow Diagram, click the Info icon () in the Actions menu.
  • In the Flow Designer's list view, navigate to the Flows page and click the Edit icon () next to the desired flow. If when you last viewed the flow you used list view, the Flow page appears by default on the Steps tab; otherwise the Flow diagram appears. Click the Details tab.

DRUID groups the flow training phrases per bot language. By default it displays the training phrases defined in bot default language. To manage the training phrases in a specific bot language, from the Languages field, select the desired one.

Step 2. Add training phrases

To add a new training phrase, place the cursor inside the Add new training phase field and enter the desired training phrase, then click the Add icon.

The training phrase is displayed at the bottom of the listing.

Keep in mind key points when defining intents. To learn the Dos and Don'ts of intent definition, see NLP Best Practices. and Using NER in Dialogs.

You can add as many training phrases as needed. The DRUID built-in ML engine will also recognize and match similar phrases automatically.

Hint:  If you have technical phrases — such as __update_db_parameters__ or #CreateNewFlowFromBot — that are not natural language inputs, do not add them here. Instead, add them in the Commands section of the flow. The Commands section (available in DRUID 8.14 and higher) allows you to define exact-match phrases that are not used to train the NLP model. This helps reduce noise and improves accuracy especially when using NLP with LLM support.

Save your settings after adding training phrases.

Step 3. Train the bot with new intents

After adding training phrases, train the bot with the intents. On the main menu, click NLU > Configurations. Click on the Intents tab, then click the Train button to start training the bot with the newly added intents and training phrases.

The training model includes ALL training phrases defined on ALL flows associated with the respective bot.

Note:  The training process can take a couple of minutes or more, depending on the number of flows. During the training process, the bot remains fully functional using the last trained model. Only upon the successful completion of the training process the new model goes live.
Hint:   You can also trigger the NLP model retraining by ticking the Enable auto train check box. For higher bot performance, if your bot has many flows, we recommend you to leave the Enable auto train check box ticked off and train the model once using the Train button.

Once trained, the following information is available in the Train area:

  • LastTrainedOn – the date and time when the model was last trained on. It has the following format: x days ago (YYYY-MM-DD HH:MM:SS)
  • Status – the status of the model training (Trained / Untrained).
  • DownloadTrainErrors – Download (in your default Download folder) a JSON file which contains the errors occurred (if any) during the last NLP model training.
  • DownloadTrainLog - Download (in your default Download folder) a JSON file which contains comprehensive training phrases data: status per training phrases, score for each utterance, etc.

For more information on the NLP engine settings, see Setting Up the Bot s NLP Engine.

After adding the training phrases and training the bot with the new intent, you need to define the dialog.

Edit Training Phrases

Edit existing phrases by modifying the text and saving the flow. Note that a warning message may appear if the flow has no associated roles.

Delete Training Phrases

Delete training phrases by clicking the delete icon inline.